<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head >
    <meta charset="UTF-8">
    <title>Title</title>
    <!--    <script th:src="@{/js/bootstrap.min.js}" type="text/javascript"></script>-->
    <!-- 引入 layui.css -->
    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />

    <!-- 引入 layui.js -->
    <script src="https://www.layuicdn.com/layui/layui.js"></script>
    <script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js"></script>

    <script>
        function ShowAddBox(){
            layer.open({
                type:1,
                title:"登录",
                area:["395px","300px"],
                content:$("#addBox"),
            });
        }

    </script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div th:replace="common/frame::header"></div>
    <div th:replace="common/frame::side"></div>

    <div class="layui-body">
        <!-- 内容主体区域 -->

        <!--        <h1>当前Redis中所有key</h1>-->
        <table class="layui-table">
            <tr >
                <td>序号</td>
                <td>key</td>
                <td>value</td>
                <td>操作</td>
            </tr>
            <tr th:each="key,stat:${hashList}">
                <td th:text="${stat.count}"></td>
                <td th:text="${key}"></td>
                <td th:text="${key}"></td>
                <td><a onclick=""></a></td>
            </tr>
        </table>

        <button class="layui-btn" th:onclick="ShowAddBox()">添加</button>

        <div th:replace="common/frame::foot"></div>

    </div>
</div>
<div id="addBox" style="display: none">

    <form class="layui-form" th:action="@{addHashName}" method="post">
        <div class="layui-form-item">
            value:<input name="hashName" type="text"  id="valueInput">
        </div>
        <button type="submit">提交</button>
    </form>
</div>
</body>

<script type="module">
    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    // import * as layui from "../static/js/dropzone/dropzone";

    layui.use('element', function(){
        var element = layui.element;

        //…
    });
</script>
</html>